cargo-llvm-cov: fix tests, mark broken as needed#197478
cargo-llvm-cov: fix tests, mark broken as needed#197478matthiasbeyer merged 4 commits intoNixOS:masterfrom
Conversation
winterqt
left a comment
There was a problem hiding this comment.
So the change I want to try here is using fetchurl and postFetch to not only get the lockfile from crates.io, but collapse it into a single FOD to take advantage of caching.
Essentially, use fetchurl on https://crates.io/api/v1/crates/${pname}/${version}/download, with downloadToTemp set to true, and do something like tar xzf $downloadedFile ${pname}-${version}/Cargo.lock; mv */Cargo.lock $out in postFetch:
fetchurl {
name = "Cargo.lock";
url = "https://crates.io/api/v1/crates/${pname}/${version}/download";
downloadToTemp = true;
postFetch = ''
tar xzf $downloadedFile ${pname}-${version}/Cargo.lock
mv */Cargo.lock $out
'';
}Then, copy this into the source in postPatch and cargoUpdateHook, which should then allow us to run tests while not having to include the lockfile.
|
Though, now that I say that, I wonder if the compressed source tarball is smaller than the uncompressed Cargo.lock, lol. I'd guess that it's bigger, but who knows with the sourcery that is compression. |
|
Cursed: compress the checked-in I'll try implementing your suggestion. Is the concern mainly the size of the |
|
I'd say checking in large autogenerated files is worse than doing this, but at the same time... this is a pretty small lockfile. Hrm. Unrelated to this, but we currently disable the profiler runtime on non-Linux platforms. Given this, can you set (If you have Darwin hardware, feel free to try to enable it and test it -- if not, I'll do it sometime this week, I just don't want to have this package have to wait for a staging cycle.) |
Well, good news: your trick worked perfectly. And yeah I agree that checking in autogenerated stuff is suboptimal.
Sure. EDIT: One thing I'm curious about is whether this makes sense/still applies when getting your rust toolchain from somewhere other than nixpkgs, e.g. fenix.
I don't, but I have a friends with x86_64-darwin and aarch64-darwin that I may be able to rope into this. |
1415724 to
a606f1e
Compare
a606f1e to
92538d7
Compare
|
@Mic92 @zowoq Thoughts on 09b7abe1a29c4c47982984d8ea092b9c50031048, just to use There's another option we can take here, and that's adding a way to specify a |
92538d7 to
6ff7457
Compare
|
Looks like someone else beat us to it: #192813 Do we want to close this, or should I rebase on top of their changes so we can have working tests and a proper |
|
Let's do that, and adjust the commit message(s?) appropriately, please. Sorry about forgetting this. |
|
No problem! I can do that, yes. Do we want to leave the changes to |
Probably best to move it to a separate PR, so this isn't blocked on any (potential) issues/discussions. |
6ff7457 to
ea86614
Compare
|
Okay, rebase is done and |
af3a9a5 to
cc0cede
Compare
|
oops, merge conflict again |
cc0cede to
8e11811
Compare
8e11811 to
1f9d679
Compare
1f9d679 to
a282bd4
Compare
matthiasbeyer
left a comment
There was a problem hiding this comment.
I think we can merge this now, can't we?
|
I mean, I think so, but I'm obviously biased. And it would be nice to get an approval from @winterqt since they've invested a lot of time helping with this and reviewing it though. |
a282bd4 to
cefb386
Compare
Waited for three weeks but no reply.
|
I assume that they won't reply, so I'll merge after some |
|
Result of 1 package built:
|
Description of changes
This packages cargo-llvm-cov, a tool for generating code coverage reports using built-in features of recent Rust toolchains.Supersedes #197453Alternative to #185183Notably, this PR has all the tests running and passing, and does not wrap the binary, allowing users to choose their own toolchain versions.
Things done
sandbox = trueset innix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)nixos/doc/manual/md-to-db.shto update generated release notes